package com.music.service.albums.constants;



public enum AlbumState {
	
	DELETED(1), 
	ACTIVE(2) ,
	VERIFIED(3);

	private int mState;

	AlbumState(int pState) {
		mState = pState;
	}

	public int getState() {
		return mState;
	}
	
	public static AlbumState getAlbumState(int pState) {
		switch (pState) {
		case 1:
			return DELETED;
		case 2:
			return ACTIVE;
		case 3:
			return ACTIVE;
		default:
			return null;
		}
	}
	
	public static AlbumState getAlbumState(String pState){
		if (pState != null && pState.length() > 0) {
			char state = pState.charAt(0);
			switch (state) {
			case 'D':
				return DELETED;
			case 'A':
				return ACTIVE;
			case 'V':
				return VERIFIED;
			}
		}
		return null;
	}
}
